<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="org.factory.*,org.vo.*"%>
<%@ page import="java.util.*"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>用户页面</title>
<link id="easyuiTheme" rel="stylesheet" type="text/css"
	href="easyui/jslib/easyui1.4.3/themes/default/easyui.css" />
<link rel="stylesheet" type="text/css"
	href="easyui/jslib/easyui1.4.3/themes/icon.css" />
<script type="text/javascript"
	src="easyui/jslib/easyui1.4.3/jquery.min.js"></script>
<script type="text/javascript"
	src="easyui/jslib/easyui1.4.3/jquery.easyui.min.js"></script>
<script type="text/javascript"
	src="easyui/jslib/easyui1.4.3/locale/easyui-lang-zh_CN.js"
	charset="utf-8"></script>
<style>
#container {
	width: 380px;
	margin: 30px auto;
}

div {
	margin-top: 11px;
}

#id,#date {
	color: #999;
}
</style>
</head>
<body>
	<%
		//如果跳过登录直接进入用户信息页面，则返回登录页面
		User user = (User) session.getAttribute("user");
		if (null == user) {
			response.sendRedirect("login.jsp");
		} else {
	%>
	<div id="container"
		style="width: 330px; background: #fafafa; padding: 10px">
		<div style="padding: 3px 2px; border-bottom: 1px solid #ccc">
			<h2>用户信息</h2>
		</div>
		<form id="ff" action="update.jsp" method="post">
			<div>
				<label for="id">I&nbsp;&nbsp;&nbsp;D:</label> <input id="id"
					class="easyui-validatebox" type="text" name="aid" required="true"
					readOnly="ture" value="<%=user.getId()%>" />
			</div>
			<div>
				<label for="name">姓&nbsp;&nbsp;名:</label> <input id="name"
					class="easyui-validatebox" type="text" name="bname" required="true"
					value="<%=user.getName()%>" />
			</div>
			<div>
				<label for="gender">性&nbsp;&nbsp;别:</label> <input id="gender"
					name="csex" type="text" value="<%=user.getSex()%>" />
			</div>
			<div>
				<label for="age">年&nbsp;&nbsp;龄:</label> <input id="age"
					class="easyui-validatebox" type="text" name="dage" required="true"
					value="<%=user.getAge()%>" />
			</div>
			<div>
				<label for="mail">邮&nbsp;&nbsp;箱:</label> <input id="mail"
					class="easyui-validatebox" type="text" name="email" required="true"
					value="<%=user.getMail()%>" />
			</div>
			<div>
				<label for="passwd">密&nbsp;&nbsp;码:</label> <input id="passwd"
					class="easyui-validatebox" type="text" name="fpasswd"
					required="true" value="<%=user.getPasswd()%>" />
			</div>
			<div>
				<label for="date">注册时间:</label> <input id="date"
					class="easyui-validatebox" type="text" name="gdate" readOnly="true"
					required="true" value="<%=user.getDate()%>" />
			</div>
			<div>
				<input type="submit" value="   修改   " />
			</div>
		</form>
	</div>
	<%
		}
	%>
</body>
</html>